package com.example.springboot.mapper;

import com.example.springboot.controller.request.BasePageRequest;
import com.example.springboot.controller.request.LoginRequest;
import com.example.springboot.entity.Admin;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * ClassName:AdminMapper
 * Package:com.example.springboot.mapper
 * Description:
 *
 * @Author: Gao
 * @Create: 2023/2/2 - 10:49
 */
@Mapper
public interface AdminMapper {
    List<Admin> list();

    List<Admin> listByCondition(BasePageRequest basePageRequest);

    void save(Admin admin);

    Admin getById(int id);

    void updateById(Admin admin);

    void deleteById(int id);

    Admin getByAccountAndPassword(LoginRequest request);

    Admin getByAccount(String account);
}
